import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		digit: 10
	},
	mutations: {
		change(state, num) {
			state.digit = num
		}
	},
    getters:{
        getterDigit(state) {
			return state.digit
		}
    },
	actions: {
		change(state, num) {
			state.commit('change', num)
		}
	}
})

export default store
